package b1.project.order.entity;

import b1.project.common.base.BaseEntity;
import b1.project.common.config.MyInsertListener;
import b1.project.common.config.MyUpdateListener;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.autotable.annotation.AutoTable;
import org.dromara.autotable.annotation.ColumnComment;
import org.dromara.autotable.annotation.ColumnType;

import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Data
@AutoTable(value = "b1_order")
@Table(value = "b1_order", onInsert = MyInsertListener.class, onUpdate = MyUpdateListener.class)
public class OrderEntity extends BaseEntity {

    @ColumnType(value = "varchar", length = 32)
    @ColumnComment("订单地址")
    private String productName;

    @ColumnType(value = "DECIMAL",decimalLength = 10)
    @ColumnComment("订单价格")
    private BigDecimal price;
}
